export const getServerConfig = async () => {
    let serverConfig = {
        // server: "http://26.121.80.186:5000",
            server: "https://tengchuang.top",
        url: "",
        token: "",
        model: "",
        message: ""
    };
    const response = await fetch(serverConfig.server + "/api/ad"); // 这里需要替换为实际的有效 URL
    if (!response.ok) {
        return serverConfig;
    }
    const data = await response.json();
    serverConfig = {
        ...serverConfig,
        url: data[0].url,
        token: data[0].api_key,
        model: data[0].model,
        message: data[0].message,
    };
    return serverConfig
}